home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / aviwin / form1.frm < prev   
Text File  |  1995-05-08  |  4KB  |  151 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "AVI Viewer"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1770
  7.    ClientWidth     =   7365
  8.    Height          =   4710
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4020
  12.    ScaleWidth      =   7365
  13.    Top             =   1140
  14.    Width           =   7485
  15.    Begin FileListBox File1 
  16.       Height          =   1785
  17.       Left            =   5775
  18.       TabIndex        =   7
  19.       Top             =   315
  20.       Width           =   1485
  21.    End
  22.    Begin DriveListBox Drive1 
  23.       Height          =   315
  24.       Left            =   3990
  25.       TabIndex        =   6
  26.       Top             =   2310
  27.       Width           =   3270
  28.    End
  29.    Begin DirListBox Dir1 
  30.       Height          =   1830
  31.       Left            =   3990
  32.       TabIndex        =   5
  33.       Top             =   315
  34.       Width           =   1590
  35.    End
  36.    Begin CommandButton Command3 
  37.       Caption         =   "Pause"
  38.       Height          =   435
  39.       Left            =   1575
  40.       TabIndex        =   4
  41.       Top             =   3045
  42.       Width           =   750
  43.    End
  44.    Begin PictureBox MMControl1 
  45.       BackColor       =   &H000000FF&
  46.       Height          =   1000
  47.       Left            =   0
  48.       ScaleHeight     =   975
  49.       ScaleWidth      =   975
  50.       TabIndex        =   3
  51.       Top             =   0
  52.       Width           =   1000
  53.    End
  54.    Begin CommandButton Command2 
  55.       Caption         =   "Stop"
  56.       Height          =   435
  57.       Left            =   2415
  58.       TabIndex        =   0
  59.       Top             =   3045
  60.       Width           =   750
  61.    End
  62.    Begin CommandButton Command1 
  63.       Caption         =   "Play"
  64.       Height          =   435
  65.       Left            =   735
  66.       TabIndex        =   1
  67.       Top             =   3045
  68.       Width           =   750
  69.    End
  70.    Begin PictureBox Picture1 
  71.       Height          =   2325
  72.       Left            =   210
  73.       ScaleHeight     =   2295
  74.       ScaleWidth      =   3450
  75.       TabIndex        =   2
  76.       Top             =   315
  77.       Width           =   3480
  78.    End
  79.    Begin Label Label1 
  80.       Caption         =   "Search: *.AVI"
  81.       Height          =   225
  82.       Left            =   6090
  83.       TabIndex        =   8
  84.       Top             =   105
  85.       Width           =   1170
  86.    End
  87.    Begin Menu mnuAbout 
  88.       Caption         =   "About"
  89.       Begin Menu mnuAVIView 
  90.          Caption         =   "About AVI Viewer..."
  91.       End
  92.    End
  93. End
  94. Declare Function mciSendString Lib "mmsystem" (ByVal lpstrCommand$, ByVal lpstrReturnStr As Any, ByVal wReturnLen%, ByVal hCallBack%) As Long
  95.  
  96. Sub Command1_Click ()
  97.     MMControl1.FileName = File1.Path & "\" & File1
  98.     MMControl1.Command = "Open"
  99.  
  100.     'Put window handle in CmdStr$
  101.     CmdStr$ = "window " + MMControl1.FileName + " handle " + Format$(picture1.hWnd)
  102.     'Send window handle to mciSendString
  103.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  104.     'Put output in window
  105.     CmdStr$ = "put " + MMControl1.FileName + " destination "
  106.     ReturnVal& = mciSendString(CmdStr$, 0&, 0, 0&)
  107.  
  108.     MMControl1.Command = "Prev"
  109.     MMControl1.Command = "Play"
  110. End Sub
  111.  
  112. Sub Command2_Click ()
  113.     MMControl1.Command = "Stop"
  114. End Sub
  115.  
  116. Sub Command3_Click ()
  117.     MMControl1.Command = "Pause"
  118. End Sub
  119.  
  120. Sub Dir1_Change ()
  121.     File1.Path = Dir1.Path
  122. End Sub
  123.  
  124. Sub Drive1_Change ()
  125.     Dir1.Path = Drive1.Drive
  126. End Sub
  127.  
  128. Sub File1_Click ()
  129.     MMControl1.Command = "Close"
  130.     MMControl1.FileName = File1.Path & "\" & File1
  131. End Sub
  132.  
  133. Sub File1_DblClick ()
  134.     MMControl1.Command = "Close"
  135.     MMControl1.FileName = File1.Path & "\" & File1
  136.     Command1.Value = True
  137. End Sub
  138.  
  139. Sub Form_Load ()
  140.     File1.Pattern = "*.AVI"
  141.     MMControl1.Notify = False
  142.     MMControl1.Wait = True
  143.     MMControl1.Shareable = False
  144.     MMControl1.DeviceType = "AVIVideo"
  145. End Sub
  146.  
  147. Sub mnuAVIView_Click ()
  148.     MsgBox "AVI Viewer by Dustin Callaway" + Chr(10) + "CompuServe ID# 72154,2326", 64, "About AVI Viewer"
  149. End Sub
  150.  
  151.